/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.spring.servicios;

import com.spring.modelo.DAO.PlanDAO;
import com.spring.modelo.entidad.Carrera;
import com.spring.modelo.entidad.DetallePlan;
import com.spring.modelo.entidad.Planes;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author Ricardo
 */
@Service
public class ServicioPlan {
    @Autowired
    private PlanDAO pdao;

    public List<Planes> getListaPlan() {
        return pdao.getListaPlan();
    }

    public Planes buscarPlan(int codigo) {
        return pdao.buscarPlan(codigo);
    }

    public boolean insertarPlan(Planes p) {
        return pdao.insertarPlan(p);
    }

    public List<Planes> getListaPlanesPorTipo(Carrera c) {
        return pdao.getListaPlanesPorTipo(c);
    }

    public boolean eliminarPlan(int codigo) {
        return pdao.eliminarPlan(codigo);
    }

    public List<DetallePlan> visualizarPlan(int codigo) {
        return pdao.visualizarPlan(codigo);
    }
    
}
